Open file:
/app/design/frontend/default/<your_theme>/template/page/switch/languages.phtml
Find
<option value=”<?php echo $_lang->getCurrentUrl(false) ?>”<?php echo $_selected ?>><?php echo $this->htmlEscape($_lang->getName()) ?></option>
Make sure that there is false in the getCurrentUrl(false).
Step2 :
In Admin, go to System > Configuration > Web / URL Options > Add Store Code to Urls
Check it to ‘Yes’.
Step 2: Refresh Cache
Should work now.